Integrand size = 40, antiderivative size = 75 \[ \int \frac {(a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx=\frac {2 (b B+a C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 (3 a B+b C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}+\frac {2 b C \sqrt {\cos (c+d x)} \sin (c+d x)}{3 d} \]
2*(B*b+C*a)*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticE(sin( 1/2*d*x+1/2*c),2^(1/2))/d+2/3*(3*B*a+C*b)*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos (1/2*d*x+1/2*c)*EllipticF(sin(1/2*d*x+1/2*c),2^(1/2))/d+2/3*b*C*sin(d*x+c) *cos(d*x+c)^(1/2)/d
Time = 1.07 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.89 \[ \int \frac {(a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx=\frac {2 \left (3 (b B+a C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+(3 a B+b C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+b C \sqrt {\cos (c+d x)} \sin (c+d x)\right )}{3 d} \]
(2*(3*(b*B + a*C)*EllipticE[(c + d*x)/2, 2] + (3*a*B + b*C)*EllipticF[(c + d*x)/2, 2] + b*C*Sqrt[Cos[c + d*x]]*Sin[c + d*x]))/(3*d)
Time = 0.63 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.04, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3042, 3508, 3042, 3447, 3042, 3502, 27, 3042, 3227, 3042, 3119, 3120}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^{3/2}}dx\) |
\(\Big \downarrow \) 3508 |
\(\displaystyle \int \frac {(a+b \cos (c+d x)) (B+C \cos (c+d x))}{\sqrt {\cos (c+d x)}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (B+C \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 3447 |
\(\displaystyle \int \frac {(a C+b B) \cos (c+d x)+a B+b C \cos ^2(c+d x)}{\sqrt {\cos (c+d x)}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a C+b B) \sin \left (c+d x+\frac {\pi }{2}\right )+a B+b C \sin \left (c+d x+\frac {\pi }{2}\right )^2}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {2}{3} \int \frac {3 a B+b C+3 (b B+a C) \cos (c+d x)}{2 \sqrt {\cos (c+d x)}}dx+\frac {2 b C \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{3} \int \frac {3 a B+b C+3 (b B+a C) \cos (c+d x)}{\sqrt {\cos (c+d x)}}dx+\frac {2 b C \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \int \frac {3 a B+b C+3 (b B+a C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {2 b C \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {1}{3} \left ((3 a B+b C) \int \frac {1}{\sqrt {\cos (c+d x)}}dx+3 (a C+b B) \int \sqrt {\cos (c+d x)}dx\right )+\frac {2 b C \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \left ((3 a B+b C) \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+3 (a C+b B) \int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}dx\right )+\frac {2 b C \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\) |
\(\Big \downarrow \) 3119 |
\(\displaystyle \frac {1}{3} \left ((3 a B+b C) \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {6 (a C+b B) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}\right )+\frac {2 b C \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\) |
\(\Big \downarrow \) 3120 |
\(\displaystyle \frac {1}{3} \left (\frac {2 (3 a B+b C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{d}+\frac {6 (a C+b B) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}\right )+\frac {2 b C \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\) |
((6*(b*B + a*C)*EllipticE[(c + d*x)/2, 2])/d + (2*(3*a*B + b*C)*EllipticF[ (c + d*x)/2, 2])/d)/3 + (2*b*C*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d)
3.9.56.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)* (c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2 )*(c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_ .) + (f_.)*(x_)]^2), x_Symbol] :> Simp[1/b^2 Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*(b*B - a*C + b*C*Sin[e + f*x]), x], x] /; FreeQ [{a, b, c, d, e, f, A, B, C, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Leaf count of result is larger than twice the leaf count of optimal. \(325\) vs. \(2(121)=242\).
Time = 5.46 (sec) , antiderivative size = 326, normalized size of antiderivative = 4.35
method | result | size |
default | \(-\frac {2 \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (4 C \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +3 B a \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-3 B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) b -2 C \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +C b \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-3 C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a \right )}{3 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) | \(326\) |
parts | \(\frac {2 \left (B b +a C \right ) \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{\sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}+\frac {2 B a \,\operatorname {am}^{-1}\left (\frac {d x}{2}+\frac {c}{2}| \sqrt {2}\right )}{d}-\frac {2 C b \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (4 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{3 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) | \(340\) |
-2/3*((2*cos(1/2*d*x+1/2*c)^2-1)*sin(1/2*d*x+1/2*c)^2)^(1/2)*(4*C*cos(1/2* d*x+1/2*c)*sin(1/2*d*x+1/2*c)^4*b+3*B*a*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*si n(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))-3*B*(sin (1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticE(cos(1/ 2*d*x+1/2*c),2^(1/2))*b-2*C*cos(1/2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^2*b+C*b* (sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticF(co s(1/2*d*x+1/2*c),2^(1/2))-3*C*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+ 1/2*c)^2-1)^(1/2)*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))*a)/(-2*sin(1/2*d*x +1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)/sin(1/2*d*x+1/2*c)/(2*cos(1/2*d*x+1/ 2*c)^2-1)^(1/2)/d
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.10 (sec) , antiderivative size = 156, normalized size of antiderivative = 2.08 \[ \int \frac {(a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx=\frac {2 \, C b \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) + \sqrt {2} {\left (-3 i \, B a - i \, C b\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + \sqrt {2} {\left (3 i \, B a + i \, C b\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 3 \, \sqrt {2} {\left (-i \, C a - i \, B b\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 3 \, \sqrt {2} {\left (i \, C a + i \, B b\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{3 \, d} \]
integrate((a+b*cos(d*x+c))*(B*cos(d*x+c)+C*cos(d*x+c)^2)/cos(d*x+c)^(3/2), x, algorithm="fricas")
1/3*(2*C*b*sqrt(cos(d*x + c))*sin(d*x + c) + sqrt(2)*(-3*I*B*a - I*C*b)*we ierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c)) + sqrt(2)*(3*I*B*a + I*C*b)*weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c)) - 3*sq rt(2)*(-I*C*a - I*B*b)*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, c os(d*x + c) + I*sin(d*x + c))) - 3*sqrt(2)*(I*C*a + I*B*b)*weierstrassZeta (-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c))))/d
Timed out. \[ \int \frac {(a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx=\text {Timed out} \]
\[ \int \frac {(a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} {\left (b \cos \left (d x + c\right ) + a\right )}}{\cos \left (d x + c\right )^{\frac {3}{2}}} \,d x } \]
integrate((a+b*cos(d*x+c))*(B*cos(d*x+c)+C*cos(d*x+c)^2)/cos(d*x+c)^(3/2), x, algorithm="maxima")
\[ \int \frac {(a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} {\left (b \cos \left (d x + c\right ) + a\right )}}{\cos \left (d x + c\right )^{\frac {3}{2}}} \,d x } \]
integrate((a+b*cos(d*x+c))*(B*cos(d*x+c)+C*cos(d*x+c)^2)/cos(d*x+c)^(3/2), x, algorithm="giac")
Time = 0.70 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.13 \[ \int \frac {(a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx=\frac {2\,C\,b\,\left (\sqrt {\cos \left (c+d\,x\right )}\,\sin \left (c+d\,x\right )+\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )\right )}{3\,d}+\frac {2\,B\,a\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {2\,B\,b\,\mathrm {E}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {2\,C\,a\,\mathrm {E}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d} \]